<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
        <title>登陆</title>
    </head>
    <body>
        {% include 'message.html' %}
        {% if user.is_authenticated %}
            <p>您已经用{{ user }}登陆成功</p>
            <p><a href="{% url check_order %}">查看我的订单</a></p>
            <p><a href="{% url today_order %}">查看当日所有人的订单</a></p>
            <p><a href="{% url order_prefs %}">订单统计</a></p>
            <p><a href="{% url guestbook %}">留言板</a></p>
            {% if user.is_superuser %}
            <p><a href="/admin/">进入后台管理</a></p>
            {% endif %}
            <p><a href="{% url acct_logout_and_login %}">注销</a></p>
        {% else %}
            <h1>登陆</h1>
           {% url acct_signup as signup_url %}
            <p>还没有帐号，请<a href="{{ signup_url }}">注册</a>！</p>
            <form id="login_form" method="post" action="{% url acct_login %}">
                <fieldset>
                    {{ form.as_p }}
                    <input type="submit" value="登陆" />
                </fieldset>
            </form>
        {% endif %}
    </body>
    
</html>